Skip to content

fix(bridge): align schema limits with evidence validation - #281

Merged
wesm merged 2 commits into
kenn-io:mainfrom
rodboev:bridge-schema-bounds
Sep 6, 2026
Merged

fix(bridge): align schema limits with evidence validation#281
wesm merged 2 commits into
kenn-io:mainfrom
rodboev:bridge-schema-bounds

Conversation

@rodboev

@rodboev rodboev commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

The published bridge schema now matches the Go validator's limits on heading depth, geometry counts, and scalar bounds, so a provider that validates its evidence against the schema gets the same answer Docbank will. A 20,000-point polygon is accepted, and zero-sized frames or over-limit values are refused by the schema itself. The schema used to allow wider numbers than the validator, so a provider could build payloads Docbank then rejected.

A few limits still need Go validation, so the schema states them plainly: 100,000 total polygon points per geometry, a 1 MiB heading budget, and UTF-8 byte limits, since JSON Schema counts code points, not bytes.

Closes #266

@roborev-ci

roborev-ci Bot commented Sep 4, 2026

Copy link
Copy Markdown

roborev: Combined Review (11da1b9)

No issues found.


Reviewers: 2 done | Synthesis: codex | Total: 1m5s

@rodboev rodboev changed the title Align bridge schema limits with evidence validation fix(bridge): align schema limits with evidence validation Sep 4, 2026
@wesm wesm self-assigned this Sep 6, 2026
Bridge callers could reject valid polygon outlines or submit scalar values
that Docbank would immediately reject. Express the field bounds in the
published schema and describe the aggregate and UTF-8 byte limits that
still require Go validation. Exercise the changed boundaries against the
validator so future limit changes expose drift.

The cleanup retry test imposed a one-second completion budget on real disk
operations. Give background work time to finish, inspect its terminal state,
and join it before closing the test vault. The synchronous test continues
to verify the persisted retry state.

Generated with Codex
Co-authored-by: Codex <codex@users.noreply.github.com>
@roborev-ci

roborev-ci Bot commented Sep 6, 2026

Copy link
Copy Markdown

roborev: Combined Review (fcb3b2d)

No issues found.


Reviewers: 2 done | Synthesis: codex | Total: 2m31s

@wesm
wesm merged commit 67ff0ea into kenn-io:main Sep 6, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Bridge schema numeric bounds are wider than the Go validator accepts

2 participants